# -*- coding: utf-8 -*-

# -*- coding: utf-8 -*-


from PyQt5.QtWidgets import QWidget, QLineEdit, QFormLayout, QApplication
import sys


class LinE(QWidget):
    def __init__(self):
        super(LinE, self).__init__()
        flo = QFormLayout()
        lin = QLineEdit()
        lin.textChanged.connect(self.text)  # 可以自动获取参数,获取到文本
        flo.addRow(lin)

        self.setLayout(flo)

    def text(self, text):
        print("获取到的文本", text)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    line = LinE()
    line.show()
    sys.exit(app.exec_())
